import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: ()=>import('@/views/Home.vue'),
      children:[
        {path:'commodity',component:()=>import('@/views/Commodity.vue')},
        {path:'menu',component:()=>import('@/views/Menu.vue')},
        {path:'role',component:()=>import('@/views/Role.vue')},
        {path:'permissions',component:()=>import('@/views/Permissions.vue')},


        
      ]
    },
    {
      path: '/',
      name: 'login',
      component: () => import('@/views/Login.vue'),
    },
    {
      path: '/reg',
      component: ()=>import('@/views/Regjster.vue'),
    },
  ],
})

export default router
